package com.company.cloud.club.modules.vo;

import com.company.cloud.club.modules.core.util.ValidateUtil;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class ActivityVo {

    private String id;

    private String title;

    private String img;

    private String label;

    private String pureLabel;

    private Integer num;

    private String author;

    private String authorAvatar;

    private String ctime;

    private String startTime;

    private String endTime;

    private String location;

    private String state;

    private String prizeTest;

    private Integer virtualHuman;

    private Integer userId;
    /**
     * 经度
     */
    private String longitude;

    /**
     * 纬度
     */
    private String latitude;

    private Integer hot;

    private Integer sort;

    private Integer home;

    private List<ClubMemberVo> unionPerson = new ArrayList<>();

    private List<ClubVo> clubVo = new ArrayList<>();

    private List<ClubMemberVo> memberList = new ArrayList<>();

    public ActivityVo(String title, String label, String img,String id) {
        this.title = title;
        this.label = label;
        this.img = img;
        this.id = id;
    }
    public ActivityVo(String title, String label, String img) {
        this.title = title;
        this.label = label;
        this.img = img;
    }

    public ActivityVo(String title, String label, String img, Integer num) {
        this.title = title;
        this.label = label;
        this.img = img;
        this.num = num;
    }

    public void addClubVo(ClubVo clubVo) {
        if (ValidateUtil.isValid(clubVo)) {
            this.clubVo.add(clubVo);
        }
    }

    public void addMemberVo(ClubMemberVo clubVo) {
        if (ValidateUtil.isValid(clubVo)) {
            this.memberList.add(clubVo);
        }
    }

    public void addUnionPerson(ClubMemberVo clubVo) {
        if (ValidateUtil.isValid(clubVo)) {
            this.unionPerson.add(clubVo);
        }
    }

}
